import request from '@/utils/request'

//获取部门树数据
export function getDepartTree(data) {
	return request({
		method: 'get',
		url: 'tbSysDept/queryTree',
		headers: {
			userButton: '4ba85c22afd542178c29a168a384f829'
		},
		params: data
	})
}

//获取部门列表数据
export function getDepartListData(data) {
	return request({
		method: 'get',
		url: 'tbSysDept/queryList',
		headers: {
			userButton: '4ba85c22afd542178c29a168a384f829'
		},
		params: data
	})
}

//添加部门
export function addedDepart(data) {
	return request({
		method: 'post',
		url: 'tbSysDept/add',
		headers: {
			userButton: '6bfd84b607874106ad5fb41dd0dc3ba3'
		},
		data,
	})
}

//修改部门
export function updateDepart(data) {
	return request({
		method: 'post',
		url: 'tbSysDept/update',
		headers: {
			userButton: 'd32ebb3f9f744a54b9ff2342782e1b23'
		},
		data,
	})
}

//删除部门
export function deleteDepart(id) {
	return request({
		method: 'get',
		url: 'tbSysDept/delete/' + id,
		headers: {
			userButton: 'f5b3eb003d314ed082032058ef09dd4d'
		},
	})
}

//获取部门详情
export function queryDepart(id) {
	return request({
		method: 'get',
		url: 'tbSysDept/query/' + id,
		headers: {
			userButton: '87d75acc2b62453ba6a9f166b4149999'
		},
	})
}